<template>
  <t-image-viewer v-if="!store.isMobileType" v-model:visible="ImgVisible" :images="[urls + props.info.value]">
  </t-image-viewer>
  <van-image-preview :show-index="false" v-else v-model:show="ImgVisible" :images="[urls + props.info.value]">
  </van-image-preview>
  <div class="outline-parent jy-style-height">
    <div class="flex-box border-hover-style">
      <div
        class="Showroom-parent"
        v-if="props.info.digitalShowroom"
        :class="!props.info.value && !props.info.subTitle && !props.info.remarks && 'Showroom'"
      >
        <digitalShowroomInfo :url="props.info.digitalShowroom" :id="props.info.id" />
      </div>
      <img
        class="outline-parent-bg"
        :src="publicUrls + 'free/style11/Level2outlineStyle1Bg.webp'"
        alt=""
      />
      <div class="outline">
        <div class="outline-content">
          <div class="content-box" v-if="props.info.text">
            {{ props.info.text }}
          </div>
          <div
            class="content-box-left"
            :style="!props.info.subTitle && !props.info.value && { justifyContent: 'center' }"
          >
            <div class="outline-subTitle" v-if="props.info.subTitle">——{{ props.info.subTitle }}</div>
            <TextMax
              v-if="props.domShow"
              :infoData="props.info"
              :data="props.info.remarks"
              :title="props.info.text"
              :row="
                props.info.value && props.info.subTitle
                  ? 7
                  : !props.info.value && !props.info.subTitle
                  ? 16
                  : props.info.value && !props.info.subTitle
                  ? 9
                  : 14
              "
            ></TextMax>
            <div class="cover" v-if="props.info.value" @click="ImgVisible = true">
              <img class="outline-cover" :src="urls + props.info.value + '?imageView2/3/format/webp'" alt="" />
            </div>
          </div>
        </div>
      </div>
    </div>
    <img class="shadow" :src="publicUrls + 'free/style11/firstLevelOutline1Shadow.webp'" alt="" />
  </div>
</template> 

<script lang="ts">
export default defineComponent({
  name: 'free11Style1',
});
</script>

<script setup lang="ts">
import { publicUrls } from '@/utils/minxin';
import digitalShowroomInfo from '@/freeComponents/unitdigitalShowroom/style11.vue';
import textMode from '../../../textMode/textMode.vue';
import { urls } from '@/utils/request/upload';
import TextMax from '@/freeComponents/textMode/TextMax.vue';
import { defineComponent, ref } from 'vue';
import { useProjectStore } from '@/store';
const store = useProjectStore();

const ImgVisible = ref(false);

const props = defineProps({
  info: {
    type: Object,
  },
  domShow: {
    type: Boolean,
  },
});

// 跳转全景链接
const open = (url: any) => {
  if (url) {
    window.open(url, '_blank');
  }
};
</script>

<style scoped lang="less">
.outline-parent {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  position: relative;
  margin-right: 280px;
}
.shadow {
  width: 176px;
  height: 200px;
  position: absolute;
  bottom: 12px;
  right: -172px;
}
.flex-box {
  width: 500px;
  height: 774px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 19;
}
.outline-parent-bg {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}
.outline {
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding-right: 48px;
  padding-left: 38px;
  position: relative;
  z-index: 20;
}
.outline-content {
  display: flex;
  justify-content: space-between;
  align-items: start;
  width: 100%;
  height: 100%;
}

.content-box {
  width: 24px;
  height: 730px;
  position: relative;
  font-family: SourceHanSerifCN-Bold;
  text-align: center;
  writing-mode: vertical-rl;
  letter-spacing: 4px;
  font-size: 24px;
  line-height: 26px;
  color: #ffecc3;
  text-shadow: 0px 5px 3px rgba(0, 0, 0, 0.3), 0px 2px 0px #6e4f35;
}
.content-box-left {
  width: 320px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 184px;
  padding-bottom: 82px;
}
.outline-subTitle {
  width: 100%;
  min-height: 56px;
  color: #fff;
  font-family: 'SourceHanSerifCN';
  font-size: 18px;
  line-height: 28px;
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.cover {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 180px;
  overflow: hidden;
  flex: 1;
  // &:hover .outline-cover {
  //   transform: scale(1.2);
  // }
  .outline-cover {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #998367;
    transition: all 0.3s ease;
  }
}
.Showroom {
  top: 30px !important;
  right: 30px !important;
}
.Showroom-parent {
  position: absolute;
  top: 10px;
  right: 100px;
  z-index: 21;
}
::v-deep .textMore-box {
  margin-bottom: 24px;
}
::v-deep .van-text-ellipsis {
  font-family: PingFangSC !important;
  font-size: 16px !important;
  color: #fff !important;
  line-height: 32px !important;
}
::v-deep .van-text-ellipsis__action::before {
  color: #ffecc3 !important;
  font-weight: 400 !important;
}
</style>